import React from 'react';
import { getFieldName } from '@/components/metadata/utils';
export const columns = [
  {
    title: tr('字段名称'),
    width: 150,
    fieldName: 'title',
  },
  {
    fieldName: 'alias',
    title: tr('属性别名'),
    width: 100,
  },
  {
    fieldName: 'propComponent',
    title: tr('组件类型'),
    width: 100,
    render: (text: string) => getFieldName(text),
  },
  {
    fieldName: 'bizPkey',
    title: tr('业务主键'),
    width: 100,
    render: (text: boolean) => (text ? tr('是') : tr('否')),
  },
  {
    fieldName: 'activeStatus',
    title: tr('启用状态'),
    width: 100,
    render: (text: string) => (text === '0' ? tr('已启用') : tr('未启用')),
  },
];
